package practice;

import org.junit.Test;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;


public class JSscroll {
	
	@Test
	public void shouldScrollTheElementIntoView(){
		
		WebDriver driver=new FirefoxDriver();
		driver.get("http://toolsqa.com");
	    JavascriptExecutor jsx=((JavascriptExecutor)driver);
	    	jsx.executeScript("document.getElementById('bottom-bar').scrollIntoView(true)");
		
	}

}
